package br.ufg.inf.espweb.sgca.dao.impl;

import br.ufg.inf.espweb.sgca.dao.CursoDao;
import br.ufg.inf.espweb.sgca.model.Curso;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author diCastro
 */
@Repository
@Transactional(propagation = Propagation.REQUIRED)
public class CursoDaoImpl extends GenericDaoImpl<Curso> implements CursoDao{
    
    @PersistenceContext
    private EntityManager entityManager;
    
    @Override
    protected EntityManager getEntityManager() {
        return entityManager;
    }

    @Override
    protected Class<Curso> getEntityClass() {
        return Curso.class;
    }
}
